{{define "system.site"}}
<!DOCTYPE html>
<html>
<style>
  #paigusu-screen {
    top: 20%;
  }
</style>
<head>
  <meta charset="utf-8">
  <title>站点设置</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="/statics/third-pkg/layui/css/layui.css">
  <link rel="stylesheet" href="/statics/admin/css/public.css" media="all">
  <style>
    body {
      background-color: #ffffff;
    }
  </style>
</head>

<body>
<div class="layui-form layuimini-form">
  <div class="layui-form-item">
    <label class="layui-form-label required">ICP备案信息</label>
    <div class="layui-input-block">
      <input type="text" name="ICP" lay-verify="required" lay-reqtext="ICP备案信息不能为空" placeholder="请输入ICP备案信息" value="" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label required">公安部备案信息</label>
    <div class="layui-input-block">
      <input type="text" name="ministryOfPublicSecurityRecordInfo" lay-verify="required" lay-reqtext="公安部备案信息不能为空" placeholder="请输入公安部备案信息" value="" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
    </div>
  </div>
</div>
<script src="/statics/third-pkg/layui/layui.js"></script>
<script src="/statics/admin/js/lay-config.js?v=2.0" charset="utf-8"></script>
<script>

  layui.use(['form','request','layer','miniTab',"common"], function() {
    var form = layui.form,
            layer = layui.layer,
            miniTab = layui.miniTab,
            $=layui.$,
            common=layui.common,
            request=layui.request;
    //监听提交
    form.on('submit(saveBtn)', function(data) {
      var subdata={
        ...data.field,
      }
      request.post('admin/roles/add',subdata).then(function (response) {
        if(response.data.code==0){
          localStorage.setItem("roles",common.generateUUID())
          layer.msg('添加角色成功',{
            time:1000
          },function (){
            miniTab.deleteCurrentByIframe();
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
            window.location.href="/admin/roles/list";
          })
        }else{
          layer.msg(response.data.msg);
        }
      }).catch(function (error) {
        console.log(error)
        layer.msg('提交失败');
      });
    });

  });
</script>
</body>

</html>
{{ end }}